package com.tbit.uqbike.client.service.impl;

import com.tbit.uqbike.client.dao.core.ConfigDao;
import com.tbit.uqbike.client.pojo.Config;
import com.tbit.uqbike.client.service.ConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service("configService")
public class ConfigServiceImpl implements ConfigService {
    @Autowired
    private ConfigDao configDao;

    @Override
    public List<Config> getAll(Integer accountId, Integer type) {
        Map<String, Object> map = new HashMap<>();
        map.put("accountId", accountId);
        map.put("type", type);
        return configDao.getAll(map);
    }

    @Override
    public Config getConfig(Integer accountId, Integer type) {
        Map<String, Object> map = new HashMap<>();
        map.put("accountId", accountId);
        map.put("type", type);
        return configDao.getConfig(map);
    }


}
